<?php 
  require_once("includes/config.php"); 
  
  $sql = 'SELECT * FROM contracts 
          LEFT JOIN clients ON 
              contracts.client_id=clients.id 
          WHERE contracts.owner_id = ? and (contract_status = 2 or contract_status = 1)
          ';

  $binds = array();
  
  $binds['owner_id'] = $_SESSION['user_id'];

  $contracts = query($sql,$binds);
 
  require("../templates/services/choose_contract.php");
?>